use tauri::{command, Manager};
use log::{debug, info};

#[command]
pub async fn close_splashscreen(window: tauri::Window) {
    debug!("Closing splash screen");
    
    // 确保主窗口已经显示
    if let Some(main_window) = window.get_webview_window("main") {
        main_window.show().unwrap();
    }
    
    // 关闭启动画面
    if let Some(splash) = window.get_webview_window("splash") {
        splash.close().unwrap();
    }
    
    info!("Application startup completed");
}